<!DOCTYPE html>
<html lang="zh-cn">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>获取特殊元素</title>
</head>

<body>

</body>

</html>
<script>
    // 1.获取html元素
    let htmlElement = window.document.documentElement;
    window.console.log(htmlElement);
    window.console.dir(htmlElement);
    // 2.获取body元素
    let bodyElement = window.document.body;
    window.console.log(bodyElement);
    window.console.dir(bodyElement);
</script>